package com.itcncp.ucenter.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.util.Date;

public class ItcsTerminalInfo implements Serializable {
    /**
     * 通信盒设备号
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long terminalNo;

    /**
     * 收费公路编号
     *
     * @mbg.generated
     */
    private String tollRoadId;

    /**
     * 收费路段编号
     *
     * @mbg.generated
     */
    private String roadsectionId;

    /**
     * 收费站编号
     *
     * @mbg.generated
     */
    private String stationId;

    /**
     * 收费广场号
     *
     * @mbg.generated
     */
    private String tollPlazaId;

    /**
     * 收费车道编号
     *
     * @mbg.generated
     */
    private String laneId;

    /**
     * 1：未启用 2：启用 3：异常 4：其他
     *
     * @mbg.generated
     */
    private Byte terminalState;

    /**
     * 通信盒密码，注册时提供 通信盒连接时进行验证
     *
     * @mbg.generated
     */
    private String terminalPwd;

    /**
     * 通信盒ip
     *
     * @mbg.generated
     */
    private String terminalIp;

    /**
     * 通信盒MAC地址
     *
     * @mbg.generated
     */
    private String terminalMac;

    /**
     * 设备描述
     *
     * @mbg.generated
     */
    private String terminalDesc;

    /**
     * 注册人
     *
     * @mbg.generated
     */
    private String operator;

    /**
     * 注册时间
     *
     * @mbg.generated
     */
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public Long getTerminalNo() {
        return terminalNo;
    }

    public void setTerminalNo(Long terminalNo) {
        this.terminalNo = terminalNo;
    }

    public String getTollRoadId() {
        return tollRoadId;
    }

    public void setTollRoadId(String tollRoadId) {
        this.tollRoadId = tollRoadId;
    }

    public String getRoadsectionId() {
        return roadsectionId;
    }

    public void setRoadsectionId(String roadsectionId) {
        this.roadsectionId = roadsectionId;
    }

    public String getStationId() {
        return stationId;
    }

    public void setStationId(String stationId) {
        this.stationId = stationId;
    }

    public String getTollPlazaId() {
        return tollPlazaId;
    }

    public void setTollPlazaId(String tollPlazaId) {
        this.tollPlazaId = tollPlazaId;
    }

    public String getLaneId() {
        return laneId;
    }

    public void setLaneId(String laneId) {
        this.laneId = laneId;
    }

    public Byte getTerminalState() {
        return terminalState;
    }

    public void setTerminalState(Byte terminalState) {
        this.terminalState = terminalState;
    }

    public String getTerminalPwd() {
        return terminalPwd;
    }

    public void setTerminalPwd(String terminalPwd) {
        this.terminalPwd = terminalPwd;
    }

    public String getTerminalIp() {
        return terminalIp;
    }

    public void setTerminalIp(String terminalIp) {
        this.terminalIp = terminalIp;
    }

    public String getTerminalMac() {
        return terminalMac;
    }

    public void setTerminalMac(String terminalMac) {
        this.terminalMac = terminalMac;
    }

    public String getTerminalDesc() {
        return terminalDesc;
    }

    public void setTerminalDesc(String terminalDesc) {
        this.terminalDesc = terminalDesc;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", terminalNo=").append(terminalNo);
        sb.append(", tollRoadId=").append(tollRoadId);
        sb.append(", roadsectionId=").append(roadsectionId);
        sb.append(", stationId=").append(stationId);
        sb.append(", tollPlazaId=").append(tollPlazaId);
        sb.append(", laneId=").append(laneId);
        sb.append(", terminalState=").append(terminalState);
        sb.append(", terminalPwd=").append(terminalPwd);
        sb.append(", terminalIp=").append(terminalIp);
        sb.append(", terminalMac=").append(terminalMac);
        sb.append(", terminalDesc=").append(terminalDesc);
        sb.append(", operator=").append(operator);
        sb.append(", createTime=").append(createTime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ItcsTerminalInfo other = (ItcsTerminalInfo) that;
        return (this.getTerminalNo() == null ? other.getTerminalNo() == null : this.getTerminalNo().equals(other.getTerminalNo()))
            && (this.getTollRoadId() == null ? other.getTollRoadId() == null : this.getTollRoadId().equals(other.getTollRoadId()))
            && (this.getRoadsectionId() == null ? other.getRoadsectionId() == null : this.getRoadsectionId().equals(other.getRoadsectionId()))
            && (this.getStationId() == null ? other.getStationId() == null : this.getStationId().equals(other.getStationId()))
            && (this.getTollPlazaId() == null ? other.getTollPlazaId() == null : this.getTollPlazaId().equals(other.getTollPlazaId()))
            && (this.getLaneId() == null ? other.getLaneId() == null : this.getLaneId().equals(other.getLaneId()))
            && (this.getTerminalState() == null ? other.getTerminalState() == null : this.getTerminalState().equals(other.getTerminalState()))
            && (this.getTerminalPwd() == null ? other.getTerminalPwd() == null : this.getTerminalPwd().equals(other.getTerminalPwd()))
            && (this.getTerminalIp() == null ? other.getTerminalIp() == null : this.getTerminalIp().equals(other.getTerminalIp()))
            && (this.getTerminalMac() == null ? other.getTerminalMac() == null : this.getTerminalMac().equals(other.getTerminalMac()))
            && (this.getTerminalDesc() == null ? other.getTerminalDesc() == null : this.getTerminalDesc().equals(other.getTerminalDesc()))
            && (this.getOperator() == null ? other.getOperator() == null : this.getOperator().equals(other.getOperator()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTerminalNo() == null) ? 0 : getTerminalNo().hashCode());
        result = prime * result + ((getTollRoadId() == null) ? 0 : getTollRoadId().hashCode());
        result = prime * result + ((getRoadsectionId() == null) ? 0 : getRoadsectionId().hashCode());
        result = prime * result + ((getStationId() == null) ? 0 : getStationId().hashCode());
        result = prime * result + ((getTollPlazaId() == null) ? 0 : getTollPlazaId().hashCode());
        result = prime * result + ((getLaneId() == null) ? 0 : getLaneId().hashCode());
        result = prime * result + ((getTerminalState() == null) ? 0 : getTerminalState().hashCode());
        result = prime * result + ((getTerminalPwd() == null) ? 0 : getTerminalPwd().hashCode());
        result = prime * result + ((getTerminalIp() == null) ? 0 : getTerminalIp().hashCode());
        result = prime * result + ((getTerminalMac() == null) ? 0 : getTerminalMac().hashCode());
        result = prime * result + ((getTerminalDesc() == null) ? 0 : getTerminalDesc().hashCode());
        result = prime * result + ((getOperator() == null) ? 0 : getOperator().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }
}